package edu.xpu.compute.recommend.entity.meta;

import java.util.Date;
import java.util.List;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedAttributeNode;
import javax.persistence.NamedEntityGraph;
import javax.persistence.NamedEntityGraphs;
import javax.persistence.OneToMany;
import javax.persistence.Table;

import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

/**
 * 系统用户的院系
 * @author liukang
 * @date 2019年11月4日
 */
@Getter
@Setter
@NoArgsConstructor
@Entity(name="SysUserFaculty")
@Table(name="SYS_USER_FACULTY")
@NamedEntityGraphs({
	@NamedEntityGraph(name="SysUserFaculty.majors",
			attributeNodes={
			@NamedAttributeNode("majors")
	})
})
public class SysUserFaculty {
	
	@Id
	@GeneratedValue(strategy=GenerationType.AUTO)
	private Long id;
	/*
	 * 院系名称
	 */
	private String name;
	/*
	 * 院系编码
	 */
	private String code;
	/*
	 * 创建时间
	 */
	private Date createDate;
	@OneToMany(mappedBy="faculty")
	private List<SysUserMajor> majors;
	
	public SysUserFaculty(Long id) {
		this.id = id;
	}

}
